class Http {
    static baseUrl = `http://47.108.197.28:3000`;
    static request(url) {
        return new Promise((resolve, reject) => {
            wx.request({
                url: this.baseUrl + url,
                data: {},
                header: { 'content-type': 'application/json' },
                method: 'GET',
                dataType: 'json',
                responseType: 'text',
                success: (result) => {
                    resolve(result)
                },
                fail: (err) => {
                    reject(err)
                },
                complete: () => { }
            });
        })
    }
}

module.exports = Http;